

import torchvision.transforms as transforms

#传说之中的转换器！这里主要有两个，一个是送入神经网络训练的，还有一个是负责验证的。

class TransFormAtions(object):

    norm_mean = [0.485, 0.456, 0.406]
    norm_std = [0.229, 0.224, 0.225]
    train_transform = transforms.Compose([
        transforms.Resize((448, 448)),
        transforms.RandomCrop(32, padding=4),
        transforms.ToTensor(),
        transforms.Normalize(norm_mean, norm_std),
    ])

    valid_transform = transforms.Compose([
        transforms.Resize((448,448)),
        transforms.ToTensor(),
        transforms.Normalize(norm_mean, norm_std),
    ])

